/**
* 
	* DPM LOOK LIKE PAST 
* see <a href="{@docRoot}/Documentation/report.html"> for more information</a>
*  Copyright (c) 2009 Ecole Centrale de Nantes IRCCyN
* @author: Urunuela Richard
* @version 3.2
*/
package storm.DPMS;

import java.util.ArrayList;
import java.util.Iterator;

import storm.Processors.LEATProcessor;
import storm.Processors.Processor;
import storm.Tasks.Task;
/**
 * 
 * @author richard
 *
 */
public class DPM_inter extends DPM {
	
	private double top;
	private double bottom;
	/**
	 * 
	 */
	public void init(){
	
	}
	public void onTick(){
		ArrayList cpus = this.Kernel.getTasksListeManager().getALLProcessors();
		Iterator I = cpus.iterator();
		while (I.hasNext()){
			Processor P= (Processor) I.next();
			if (P instanceof LEATProcessor){
				//Change frequency in time 
				LEATProcessor LP = (LEATProcessor) P;
				if (LP.isRunning() ) {
					Task T = LP.getrunning();
					LP.setFreq(T.getOwnFieldIntValue("freq"));
				}
				
			}
			
		
		}
	}

}
